struct ImportantExcerpt<'a> {
    part: &'a str
}

impl<'a> ImportantExcerpt {
    fn level(&self) -> i32 {
        3
    }

    fn announce_and_return_part(&self,annoucement: &str) -> &str {
        println!("Attention please: {}", annoucement);
        self.part
    }
}

// 泛型参数类型，Trait Bound、生命周期
use std::fmt::Display;

fn longest_with_an_announcement<a',T> (x: &'a str, y: &'a str,ann: T) -> &'a str where T: Display {
    print!("Annoouncement! {}",ann);
    if x.len() > y.len() {
        x
    } else {
        y
    }
}

fn main() {
    println!("Hello, world!");
}
